/**
 * Copyright (c) 2017-2017 All Rights Reserved.
 */
package com.zbest.zpay.paycore.biz.action.paytool;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zbest.zpay.paycore.dal.dao.PaySubInfoDAO;
import com.zbest.zpay.paycore.dal.model.FluxInfoDO;
import com.zbest.zpay.paycore.dal.model.PaySubInfoDO;
import com.zbest.zpay.paycore.integration.acctrans.AcctransClient;
import com.zbest.zpay.paycore.model.PaySubInfoStatus;
import com.zbest.zpay.service.exchange.model.FluxKeyEnum;
import com.zbest.zpay.shared.process.BaseAction;
import com.zbest.zpay.shared.process.ProcessResult;

/**
 * 
 *
 * @author Administrator
 * @version $Id: NotifyAcctAction.java, v 0.1 2017-4-16 下午1:59:13 Administrator Exp $
 */
@Service("notifyAcctransAction")
public class NotifyAcctransAction extends BaseAction {

    @Resource
    private PaySubInfoDAO  paySubInfoDAO;

    @Resource
    private AcctransClient acctransClient;

    /** 
     * @see com.zbest.zpay.shared.process.BaseAction#perform(com.zbest.zpay.shared.process.ProcessResult)
     */
    @Override
    public void perform(ProcessResult processResponse) {
        FluxInfoDO fluxInfoDO = getValue(FluxKeyEnum.FLUX_INFO_DO.getCode());

        PaySubInfoDO paySubInfoDO = paySubInfoDAO.query(fluxInfoDO.getPaySubInfoId());

        if (paySubInfoDO.getStatus().equals(PaySubInfoStatus.SUCCESS.getCode())) {
            //FIXME 通知账户入账acctransServiceClient
        }
    }

}
